package com.example.lt.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @Author 小涛Tao
 * @Date: 2024/06/07/23:09
 * version 1.0 注释：配置线程池
 **/
@Configuration
public class ThreadPoolConfig {

    @Bean
    public ExecutorService executorService() {
        return Executors.newFixedThreadPool(20); // 创建一个固定大小为10的线程池
    }

}
